

#ifndef MYPROJECT_H
#define MYPROJECT_H

/*根据硬件平台选择*/
#include "stm32l4xx_hal.h"
#include "main.h"

/* Includes ------------------------------------------------------------------*/
#include "MagneticSensorI2C.h" 
#include "MagneticSensorSPI.h" 
#include "Sensor.h" 
#include "foc_utils.h"
#include "FOCMotor.h"
#include "BLDCmotor.h" 
#include "lowpass_filter.h" 
#include "pid.h"
#include "InlineCurrentSense.h"
#include "CurrentSense.h"

#define LED_blink    HAL_GPIO_TogglePin(DO_LED1_GPIO_Port, DO_LED1_Pin)

#define M1_Enable    HAL_GPIO_WritePin(DO_PWMEnable_GPIO_Port, DO_PWMEnable_Pin, 1)        //高电平使能
#define M1_Disable   HAL_GPIO_WritePin(DO_PWMEnable_GPIO_Port, DO_PWMEnable_Pin, 0)        //低电平失能

#define M1_AS5600    1   //编码器类型，只能选一
#define M1_AS5047P   0
#define M1_TLE5012B  0
#define M1_MA730     0

#endif

